<template>
  <div class="home">
    <list :data="data" />
  </div>
</template>

<script setup>
import { useRequest } from 'vue-request'
import { getPexelsList } from '@/api/mobile.js'
import list from '@/components/list/index.vue'
import { confirm } from '@/components/confirm/index.js'
import { message } from '@/components/message/index.js'
const { loading, data } = useRequest(
  async (_data) => {
    const data = _data || {
      page: 1,
      size: 20,
      categoryId: '',
      searchText: ''
    }
    const res = await getPexelsList(data)
    return res.list
  },
  {
    initialData: [],
    onSuccess: () => {
      // message('success', '获取成功')
    }
  }
)
</script>

<style lang="scss" scoped>
.home {
  height: calc(100vh - 1.1rem);
  overflow-y: auto;
}
</style>
